GADTs, Functoriality, Parametricity: Pick Two

نویسندگان

چکیده

GADTs can be represented either as their Church encodings a la Atkey, or fixpoints Johann and Polonsky. While GADT its encoding need not support map function satisfying the functor laws, fixpoint representation of must such even to well-defined. The two representations thus same in general. This observation forces choice data types languages supporting GADTs. In this paper we show that choosing whether represent determines language have parametric models. has important consequences for how program with, reason about, these advanced types.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Two-dimensional proof-relevant parametricity

Relational parametricity is a fundamental concept within theoretical computer science and the foundations of programming languages, introduced by John Reynolds [6]. His fundamental insight was that types can be interpreted not just as functors on the category of sets, but also as equality preserving functors on the category of relations. This gives rise to a model where polymorphic functions ar...

متن کامل

GADTs Meet Subtyping

While generalized algebraic datatypes (GADTs) are now considered well-understood, adding them to a language with a notion of subtyping comes with a few surprises. What does it mean for a GADT parameter to be covariant? The answer turns out to be quite subtle. It involves fine-grained properties of the subtyping relation that raise interesting design questions. We allow variance annotations in G...

متن کامل

Langlands Functoriality Conjecture

Functoriality conjecture is one of the central and influential subjects of the present day mathematics. Functoriality is the profound lifting problem formulated by Robert Langlands in the late 1960s in order to establish nonabelian class field theory. In this expository article, I describe the Langlands-Shahidi method, the local and global Langlands conjectures and the converse theorems which a...

متن کامل

GADTs meet their match

For ML and Haskell, accurate warnings when a function definition has redundant or missing patterns are mission critical. But today’s compilers generate bogus warnings when the programmer uses guards (even simple ones), GADTs, pattern guards, or view patterns. We give the first algorithm that handles all these cases in a single, uniform framework, together with an implementation in GHC, and evid...

متن کامل

GADTs meet their match ( Extended

For ML and Haskell, accurate warnings when a function definition has redundant or missing patterns are mission critical. But today’s compilers generate bogus warnings when the programmer uses guards (even simple ones), GADTs, pattern guards, or view patterns. We give the first algorithm that handles all these cases in a single, uniform framework, together with an implementation in GHC, and evid...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

ژورنال

عنوان ژورنال: Electronic proceedings in theoretical computer science

سال: 2022

ISSN: ['2075-2180']

DOI: https://doi.org/10.4204/eptcs.357.6